
<template>
  <el-select v-model="sijiKeyId" size="small" style="width:100%" filterable clearable @change="returnChange" placeholder="请选择司机" >
    <el-option 
      v-for="item in sijiList" 
      :key="item.otherId" 
      :label="item.otherValue1" 
      :value="item.otherId">
    </el-option>
  </el-select>
</template>

<script>
import { listOther } from "@/api/erp/system/othersiji";

export default {
  data() {
    return {
      sijiList : [],
      sijiKeyId : '',
    };
  },
  model:{
    prop:'sijiId',
    event: 'change'
  },
  watch:{
    sijiId : function(newValue, oldValue){
      this.sijiKeyId = newValue;
    }
  },
  props: {
    sijiId: 0,
  },
  methods: {
    returnChange(){
      this.$emit('change', this.sijiKeyId);
    },
  },
  created() {
      listOther().then((response) => {
          this.sijiList = response.rows;
      });
  },
};
</script>
